<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFrameTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('frame', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('branch_id')->nullable()->index()->comment('部门ID');
            $table->unsignedTinyInteger('level')->nullable()->comment('级别');
            $table->unsignedInteger('uid')->nullable()->index()->comment('用户ID');
            $table->unsignedInteger('belong')->nullable()->index()->comment('归属');
            $table->tinyInteger('status')->default(1)->index()->comment('状态：-1删除，0审核/禁用，1启用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('frame');
    }
}
